<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>杨梅色彩美学中心</title>
    <script src="__INDEX__/js/mui.min.js"></script>
	<link href="__INDEX__/css/mui.min.css" rel="stylesheet" />
	<link rel="stylesheet" href="__INDEX__/css/iconfont.css" />
	<link rel="stylesheet" href="__INDEX__/css/style.css" />
	<link rel="stylesheet" href="__INDEX__/css/mall.css?1=1" />	
	
</head>
<body>
	<div class="mui-content cp_content" style="padding-bottom: 50px;">
	   {include file="public/top" /}
	    <div class="sjhs_conbox">
	    	<div class="ad"><img src="__INDEX__/images/banner2.jpg?1=1"></div>
	    	<ul class="sjhs_list">

	    	</ul>
	    	<p id="no_record" style="color:#D6AA50;text-align: center;display: none;"></p>
	    </div>
	    
	</div>
	<input type="hidden" id="page" value="1" />
</body>
   {include file="public/footer" /}
</html>
<script type="text/javascript" src="__INDEX__/js/menudown.js" ></script>
<script>
	get_data();
	function get_data(){
			$.ajax({
			type:"post",
			data:{
				page:$("#page").val()
			},
			url:"{:url('index/index/sjhs')}",
			success:function(data){	
				var list=data.list;
				var html="";
				if(list&&list.length>0){
					for(var i=0;i<list.length;i++){
						var log=list[i];
						var url = "{:url('index/sjhs_page')}?id="+log.id;
						html+='<li>'+
				    			'<a href="'+url+'">'+
				    				'<div class="sjhsimg"><img src="'+log.thumb+'"></div>'+
				    				'<div class="sjhs_nambox">'+
				    					'<div class="left">'+
				    						'<div class="name">'+log.home_name+'</div>'+
				    						'<div class="tips">'+log.desc+'</div>'+
				    					'</div>'+
				    					'<div class="right">'+
				    						'<div class="pri">¥<em>'+log.cost_price+'</em>/'+log.unit+'起<br/>定金¥'+log.sale_price+'</div>'+
				    						'<div class="btn">我要预定</div>'+
				    					'</div>'+
				    				'</div>'+
				    			'</a>'+
				    		'</li>';
					}
				}else{
					$("#no_record").show();
				}
				$(".sjhs_list").append(html);
				
			}
		});
	}
	$(window).scroll(function(){
		var scrollTop = $(window).scrollTop();       //滚动条高度
		var bodyheight = $(document).height();         //文档的高度
		var windowheight = window.innerHeight;	//$(window).height();              //当前窗体的高度
		if((bodyheight - windowheight - scrollTop) == 0){
			$.ajax({
			type:"post",
			data:{
				page:parseFloat($("#page").val())+1
			},
			url:"{:url('index/member/jlj')}",
			success:function(data){	
				var list=data.list;
				var html="";
				if(list&&list.length>0){
					$("#page").val(parseFloat($("#page").val())+1);
					for(var i=0;i<list.length;i++){
						var log=list[i];
						html+='<li>'+
					    			'<a href="{:url("index/sjhs_page",["id"=>'+log.id+'])}">'+
					    				'<div class="sjhsimg"><img src="'+log.thumb+'"></div>'+
					    				'<div class="sjhs_nambox">'+
					    					'<div class="left">'+
					    						'<div class="name">'+log.home_name+'</div>'+
					    						'<div class="tips">'+log.desc+'</div>'+
					    					'</div>'+
					    					'<div class="right">'+
					    						'<div class="pri">¥<em>'+log.sale_price+'</em>/'+log.unit+'起</div>'+
					    						'<div class="btn">我要预定</div>'+
					    					'</div>'+
					    				'</div>'+
					    			'</a>'+
					    		'</li>';
					}
				}else{
					$("#no_record").show();
				}
				$(".sjhs_list").append(html);
				
			}
		});
		
		}				
	})
	
</script>